import pandas as pd
import numpy as np

df = pd.read_table('score.txt', sep=',')

# 方式1
df_hong = df.loc[df['姓名'] == '小红', :]
score_hong = df_hong['成绩']
mean_hong = score_hong.mean()
mean_std = score_hong.std()

# 方式二
number_cols = df.select_dtypes(include=[np.number])
mean_values = number_cols.mean()
